<?php $baUrl = Yii::app()->request->baseUrl; ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title><?php echo CHtml::encode($this->pageTitle); ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="<?php echo $baUrl; ?>/css/datn2011.css" media="all" />
    
    <style type="text/css">
        #side-bar {float: right; width: 25%;}
        #main-content { float: left; width:74%; clear: none;}
        #main-content h1 { color: #345f89; font-weight: bold; font-size: 16px; padding: 0 0 10px 0; margin: 0;
        border-bottom: 1px dashed #345F89; margin-bottom: 5px;
        }
    </style>
    <?php Yii::app()->getClientScript()->registerCoreScript('jquery'); ?>
    <script type="text/javascript" src="<?php echo $baUrl; ?>/js/js.js"></script>
  </head>
  <body>     
      <div id="header" class="bg-1">
        <div class="content">
            <a class="logo" href=""><img src="images/rss_feed.png" alt="SCM.VN" /></a>
            <?php $this->widget('application.extensions.mbmenu.MbMenu',array(
            'items'=>array(
                array('label'=>'Home', 'url'=>array('/admin/default/index')),
                array('label'=>'User',
                  'items'=>array(
                    array('label'=>'Default', 'url'=>array('/user/defaultUser/index')),
                    array('label'=>'Supplier', 'url'=>array('/user/supplier/index')),
                    
                    array('label'=>'Transporter', 'url'=>array('/user/transporter/index')),
                    
                  ),
                ),
                array('label'=>'Product',
                  'items'=>array(
                    array('label'=>'Category', 'url'=>array('/admin/category/index')),
                    array('label'=>'Products', 'url'=>array('/admin/product/index')),
                    
                  ),
                ),
                array('label'=>'Orders',
                  'items'=>array(
                    array('label'=>'Customer\'s Orders', 'url'=>array('/user/admin')),
                    array('label'=>'Supplier', 'url'=>array('/user/admin')),
                      array('label'=>'Tax', 'url'=>array('/admin/tax/index')),
                    array('label'=>'Shipping', 'url'=>array('/admin/ship')),
                  ),
                ),
                array('label'=>'Configs', 'url'=>array('/user/admin'),
                  'items'=>array(
                    array('label'=>'Administrator Info', 'url'=>array('/user/admin')),
                    array('label'=>'Bank', 'url'=>array('/user/admin')),
                    array('label'=>'Shipping', 'url'=>array('/admin/config')),
                  ),
                ),
                array('label'=>'Shop', 'url'=>array('/shop/products/index')),
                array('label'=>'Package', 'url'=>array('/admin/buildTree/')),
                array('label'=>'Help', 'url'=>array('/user/admin')),
                array('label'=>'Font End', 'url'=>array('/')),
                array('label'=>'Gii', 'url'=>array('/gii')),
            ),
    )); ?>                            
        </div>
          
    </div>
    <div id="container">
        <div class="content">
            <div id="navagation">
                <div class="user-guide">
                    <?php $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('url'=>Yii::app()->getModule('user')->loginUrl, 'label'=>Yii::app()->getModule('user')->t("Login"), 'visible'=>Yii::app()->user->isGuest),
                                array('url'=>Yii::app()->getModule('user')->registrationUrl, 'label'=>Yii::app()->getModule('user')->t("Đăng kí người dùng thường"), 'visible'=>Yii::app()->user->isGuest),
                                array('url'=>Yii::app()->getModule('user')->supRegistrationUrl , 'label'=>Yii::app()->getModule('user')->t("Đăng kí nhà cung cấp"), 'visible'=>Yii::app()->user->isGuest),
                                array('url'=>Yii::app()->getModule('user')->tranRegistrationUrl, 'label'=>Yii::app()->getModule('user')->t("Đăng kí đơn vị vận chuyển"), 'visible'=>Yii::app()->user->isGuest),
                                array('url'=>Yii::app()->getModule('user')->logoutUrl, 'label'=>Yii::app()->getModule('user')->t("Logout"), 'visible'=>!Yii::app()->user->isGuest),
                                array('url'=>Yii::app()->getModule('user')->profileUrl, 'label'=>Yii::app()->getModule('user')->t("Profile"), 'visible'=>!Yii::app()->user->isGuest),
                                
			),
		)); ?>
                    <span>Chào <b><?php echo Yii::app()->user->name; ?></b> </span>
                
            </div>
                   
                       <?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('zii.widgets.CBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?><!-- breadcrumbs -->
                <?php endif?>
                   


            </div>
            <div id="main">
                <div id="side-bar">
                    <?php
                        $this->widget('ShoppingCartWidget'); 
                        $this->widget('ProductCategoriesWidget'); 
	//if(!Yii::app()->user->isGuest) 
		//$this->widget('AdminWidget');

                    ?>	
                    <?php
//			$this->beginWidget('zii.widgets.CPortlet', array(
//				'title'=>'Quản lý',
//			));
//			$this->widget('zii.widgets.CMenu', array(
//				'items'=>$this->menu,
//				'htmlOptions'=>array('class'=>'operations'),
//			));
//			$this->endWidget();
		?>
                </div>
                <div id="main-side">
                    <div id="main-content">
                        <?php echo $content; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
      <div id="footer" class="bg-1">
        <div class="content">
            <ul>
                    <li><span class="address-icon"><?php echo Yii::app()->params['address'];?></span></li>
                    <li><span class="phone-icon"><?php echo Yii::app()->params['phone'];?></span></li>
                    <li><span class="mail-icon"><?php echo Yii::app()->params['email'];?></span></li>
                    <li><span class="chat-icon"><?php echo Yii::app()->params['chat'];?></span></li>
                </ul>

                   <div>
                       <a href="">Trang chủ</a> |
                        <a href="">Sản phẩm</a>
                   </div>
            <p>Giấy phép ICP số 42/GP-CBC do Bộ Thông Tin và Truyền Thông cấp ngày 22/01/2011 -Copyright © chuoicungung.com, Inc. All Rights Reserved</p>
        </div>
    </div>
  </body>
</html>
<script>
    var base_url = "<?php echo Yii::app()->getBaseUrl(true).'/index.php'; ?>";
</script>


	